/*
 * GoGame.h
 *
 *  Created on: May 30, 2011
 *      Author: hongyang
 */


#ifndef GOGAME_H_
#define GOGAME_H_

#include "Board.h"
#include "RegionBoard.h"
#include "../strategy/MoveGen.h"
#include "../smartgame/SgMove.h"
#include "../smartgame/SgBlackWhite.h"

//#define SgPoint::SG_DEFINE_MAX_SIZE = 13;

class GoGame {
public:
	GoGame();
	~GoGame();

	GoGame(GoGame& g);

	const Board& getBoard() const{
		return board;
	}

	Board& getBoard() {
		return board;
	}

	void addMove(Move move);

	void play(SgPoint p);

	void init();

	Move nextMove();

	bool endGame() const;

	SgMove currentMove() const;

	int curMoveNum() const;

	void setTimePMove(float sec);

	void printRegions() const;

	void setKomi(float f) {
		board.setKomi(f);
	}

private:
	Board board;
	RegionBoard regionBoard;
	MoveGen moveGen;

	int numMoves;
	float secPerMove;
};


inline void GoGame::printRegions() const {
	return regionBoard.print();
}

#endif /* GOGAME_H_ */
